//**************************************************************************
//
//         (C) OKulov Rostislav, 2011

/*
 ***************************************************************************
 *                                                                         *
 *   This source is free software; you can redistribute it and/or modify   *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 3 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This code is distributed in the hope that it will be useful, but      *
 *   WITHOUT ANY WARRANTY; without even the implied warranty of            *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
 *   General Public License for more details.                              *
 *                                                                         *
 *   A copy of the GNU General Public License is available on the World    *
 *   Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also      *
 *   obtain it by writing to the Free Software Foundation,                 *
 *   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.        *
 *                                                                         *
 */
 
import javax.media.opengl.*;
import com.sun.opengl.util.GLUT;

public class tshoot extends base3d{
    float g = 9.8f;
    float trenie = 0.0f;
    boolean enable = false;
    static GLUT glut = new GLUT();
    
    public tshoot() {
        
    }
       
    public void fly() {
        
        x = (float) (x + 0.03*Math.sin(ang/180*Math.PI));
        z = (float) (z + 0.03*Math.cos(ang/180*Math.PI));
    
    }

    public void draw_shoot(GLAutoDrawable drawable) {
        
        GL gl = drawable.getGL();
        
        gl.glPushMatrix();
        gl.glColor3f(0.9f,0.5f,0.5f);
        gl.glTranslatef(x,y,z);//0.1f
        gl.glRotatef(ang,0.0f,1.0f,0.0f);
        glut.glutSolidCube(0.02f);
        gl.glPopMatrix();
                
    }

    public void finish() {
    
        enable = false;
        
    }

}
 
